<template>
	<view class="shoppingMall">
		<!-- <view class="goodsItem" v-for="(item,index) in 1" :key="index" @click="toDetails()">
				<image src="../../static/logo.png" class="goodsImg"></image>
				<view class="originalCost">
					<view class="box t">商品原价</view>
					<view class="box del">￥12.99</view>
				</view>
				<view class="title">
					自带四线便携充电宝
				</view><br />
				<view class="num_price">
					<view class="num">1988人已付款</view>
					<view class="price">￥9.99</view>
				</view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		onShow() {
			// 自动加载
			this.showUnderConstruction();
		},
		
		methods:{
			toDetails(){
				uni.navigateTo({
					url:'/pages/shopppingMall/goodsDetails/goodsDetails?id=123'
				})
			},
			showUnderConstruction() {
				uni.showToast({
				    title: '功能建设中,即将跳转首页',
					icon: 'none',//图标
					mask: false,
				    duration: 1000,
				    complete: function() {
				      // 1秒后执行跳转
				      setTimeout(function() {
				        // 使用uni.navigateTo跳转到登录页面
				        uni.switchTab({
				          url: '/pages/home/home'
				        });
				      }, 1000);
				    }
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import '../../static/style/mixin.scss';

	.shoppingMall {
		@include bg1;
		padding-left: 20upx;
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;

		.goodsItem {
			box-sizing: border-box;
			padding: 20upx;
			width: 345upx;
			margin-right: 20upx;
			border-radius: 10upx;
			background-color: #fff;
			margin-top: 20upx;

			.goodsImg {
				width: 305upx;
				height: 305upx;
				border-radius: 10upx;
			}

			.originalCost {
				display: flex;
				border: 1px solid #000;
				width: 300upx;
				font-size: 20upx;

				.box {
					width: 150upx;
					height: 35upx;
					@include cc;
				}

				.t {
					background-color: #000;
					color: #fff;
				}

				.del {
					text-decoration: line-through;
				}
			}

			.title {
				font-size: 25upx;
			}

			.num_price {
				display: flex;
				justify-content: space-between;
				line-height: 30upx;

				.num {
					font-size: 20upx;

				}

				.price {
					color: red;
				}
			}
		}
	}
</style>
